3.16.60 \(\int (a+b x) (c+d x)^n \, dx\)

Optimal. Leaf size=47 \[ \frac {b (c+d x)^{n+2}}{d^2 (n+2)}-\frac {(b c-a d) (c+d x)^{n+1}}{d^2 (n+1)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {43} \begin {gather*} \frac {b (c+d x)^{n+2}}{d^2 (n+2)}-\frac {(b c-a d) (c+d x)^{n+1}}{d^2 (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)*(c + d*x)^n,x]

[Out]

-(((b*c - a*d)*(c + d*x)^(1 + n))/(d^2*(1 + n))) + (b*(c + d*x)^(2 + n))/(d^2*(2 + n))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int (a+b x) (c+d x)^n \, dx &=\int \left (\frac {(-b c+a d) (c+d x)^n}{d}+\frac {b (c+d x)^{1+n}}{d}\right ) \, dx\\ &=-\frac {(b c-a d) (c+d x)^{1+n}}{d^2 (1+n)}+\frac {b (c+d x)^{2+n}}{d^2 (2+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 41, normalized size = 0.87 \begin {gather*} \frac {(c+d x)^{n+1} (a d (n+2)-b c+b d (n+1) x)}{d^2 (n+1) (n+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)*(c + d*x)^n,x]

[Out]

((c + d*x)^(1 + n)*(-(b*c) + a*d*(2 + n) + b*d*(1 + n)*x))/(d^2*(1 + n)*(2 + n))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.03, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x) (c+d x)^n \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x)*(c + d*x)^n,x]

[Out]

Defer[IntegrateAlgebraic][(a + b*x)*(c + d*x)^n, x]

________________________________________________________________________________________

fricas [A]  time = 1.28, size = 83, normalized size = 1.77 \begin {gather*} \frac {{\left (a c d n - b c^{2} + 2 \, a c d + {\left (b d^{2} n + b d^{2}\right )} x^{2} + {\left (2 \, a d^{2} + {\left (b c d + a d^{2}\right )} n\right )} x\right )} {\left (d x + c\right )}^{n}}{d^{2} n^{2} + 3 \, d^{2} n + 2 \, d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(d*x+c)^n,x, algorithm="fricas")

[Out]

(a*c*d*n - b*c^2 + 2*a*c*d + (b*d^2*n + b*d^2)*x^2 + (2*a*d^2 + (b*c*d + a*d^2)*n)*x)*(d*x + c)^n/(d^2*n^2 + 3
*d^2*n + 2*d^2)

________________________________________________________________________________________

giac [B]  time = 1.00, size = 132, normalized size = 2.81 \begin {gather*} \frac {{\left (d x + c\right )}^{n} b d^{2} n x^{2} + {\left (d x + c\right )}^{n} b c d n x + {\left (d x + c\right )}^{n} a d^{2} n x + {\left (d x + c\right )}^{n} b d^{2} x^{2} + {\left (d x + c\right )}^{n} a c d n + 2 \, {\left (d x + c\right )}^{n} a d^{2} x - {\left (d x + c\right )}^{n} b c^{2} + 2 \, {\left (d x + c\right )}^{n} a c d}{d^{2} n^{2} + 3 \, d^{2} n + 2 \, d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(d*x+c)^n,x, algorithm="giac")

[Out]

((d*x + c)^n*b*d^2*n*x^2 + (d*x + c)^n*b*c*d*n*x + (d*x + c)^n*a*d^2*n*x + (d*x + c)^n*b*d^2*x^2 + (d*x + c)^n
*a*c*d*n + 2*(d*x + c)^n*a*d^2*x - (d*x + c)^n*b*c^2 + 2*(d*x + c)^n*a*c*d)/(d^2*n^2 + 3*d^2*n + 2*d^2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 46, normalized size = 0.98 \begin {gather*} \frac {\left (b d n x +a d n +b d x +2 a d -b c \right ) \left (d x +c \right )^{n +1}}{\left (n^{2}+3 n +2\right ) d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*(d*x+c)^n,x)

[Out]

(d*x+c)^(n+1)*(b*d*n*x+a*d*n+b*d*x+2*a*d-b*c)/d^2/(n^2+3*n+2)

________________________________________________________________________________________

maxima [A]  time = 1.17, size = 63, normalized size = 1.34 \begin {gather*} \frac {{\left (d^{2} {\left (n + 1\right )} x^{2} + c d n x - c^{2}\right )} {\left (d x + c\right )}^{n} b}{{\left (n^{2} + 3 \, n + 2\right )} d^{2}} + \frac {{\left (d x + c\right )}^{n + 1} a}{d {\left (n + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(d*x+c)^n,x, algorithm="maxima")

[Out]

(d^2*(n + 1)*x^2 + c*d*n*x - c^2)*(d*x + c)^n*b/((n^2 + 3*n + 2)*d^2) + (d*x + c)^(n + 1)*a/(d*(n + 1))

________________________________________________________________________________________

mupad [B]  time = 0.49, size = 88, normalized size = 1.87 \begin {gather*} {\left (c+d\,x\right )}^n\,\left (\frac {c\,\left (2\,a\,d-b\,c+a\,d\,n\right )}{d^2\,\left (n^2+3\,n+2\right )}+\frac {b\,x^2\,\left (n+1\right )}{n^2+3\,n+2}+\frac {x\,\left (2\,a\,d^2+a\,d^2\,n+b\,c\,d\,n\right )}{d^2\,\left (n^2+3\,n+2\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)*(c + d*x)^n,x)

[Out]

(c + d*x)^n*((c*(2*a*d - b*c + a*d*n))/(d^2*(3*n + n^2 + 2)) + (b*x^2*(n + 1))/(3*n + n^2 + 2) + (x*(2*a*d^2 +
 a*d^2*n + b*c*d*n))/(d^2*(3*n + n^2 + 2)))

________________________________________________________________________________________

sympy [A]  time = 0.82, size = 377, normalized size = 8.02 \begin {gather*} \begin {cases} c^{n} \left (a x + \frac {b x^{2}}{2}\right ) & \text {for}\: d = 0 \\- \frac {a d}{c d^{2} + d^{3} x} + \frac {b c \log {\left (\frac {c}{d} + x \right )}}{c d^{2} + d^{3} x} + \frac {b c}{c d^{2} + d^{3} x} + \frac {b d x \log {\left (\frac {c}{d} + x \right )}}{c d^{2} + d^{3} x} & \text {for}\: n = -2 \\\frac {a \log {\left (\frac {c}{d} + x \right )}}{d} - \frac {b c \log {\left (\frac {c}{d} + x \right )}}{d^{2}} + \frac {b x}{d} & \text {for}\: n = -1 \\\frac {a c d n \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {2 a c d \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {a d^{2} n x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {2 a d^{2} x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} - \frac {b c^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {b c d n x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {b d^{2} n x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac {b d^{2} x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(d*x+c)**n,x)

[Out]

Piecewise((c**n*(a*x + b*x**2/2), Eq(d, 0)), (-a*d/(c*d**2 + d**3*x) + b*c*log(c/d + x)/(c*d**2 + d**3*x) + b*
c/(c*d**2 + d**3*x) + b*d*x*log(c/d + x)/(c*d**2 + d**3*x), Eq(n, -2)), (a*log(c/d + x)/d - b*c*log(c/d + x)/d
**2 + b*x/d, Eq(n, -1)), (a*c*d*n*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + 2*a*c*d*(c + d*x)**n/(d**2*n*
*2 + 3*d**2*n + 2*d**2) + a*d**2*n*x*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + 2*a*d**2*x*(c + d*x)**n/(d
**2*n**2 + 3*d**2*n + 2*d**2) - b*c**2*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + b*c*d*n*x*(c + d*x)**n/(
d**2*n**2 + 3*d**2*n + 2*d**2) + b*d**2*n*x**2*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + b*d**2*x**2*(c +
 d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2), True))

________________________________________________________________________________________